import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Vant from 'vant';
import 'vant/lib/index.css';
import *as echarts from 'echarts'
import axios from "axios";
import { Picker } from 'vant';
import { Popover } from 'vant';
import { Dialog } from 'vant';
import { Form } from 'vant';
import { Field } from 'vant';
import { Calendar } from 'vant';
import store from "./store/index";


import { PullRefresh } from 'vant';

Vue.use(PullRefresh);

Vue.use(Popover);
Vue.use(Calendar);
Vue.use(Form);
Vue.use(Field);
// 全局注册
Vue.use(Dialog);
Vue.use(Popover);
Vue.use(Picker);
// import ElementUI from 'element-ui'; 
// import 'element-ui/lib/theme-chalk/index.css'; 

Vue.prototype.$http = axios //在Vue的原型上添加一个$http属性，该属性保存了axios
axios.defaults.baseURL = 'http://113.106.111.75:8081'

Vue.prototype.$echarts=echarts
Vue.use(Vant);
// Vue.use(ElementUI);
Vue.config.productionTip = false

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: function (h) { 
    // 假设您有一个名为revenue的变量，其中包含要显示的数字
    // var revenue = 200000;

    // 获取按钮元素
    // var button = document.getElementById('revenue-button');

    // 设置按钮的文本为带有变量的字符串
    // button.textContent = '月累计营业额 ' + revenue + ' 元';
    // console.log(button.textContent)
    return h(App) 
  }
}).$mount('#app')

Vue.filter('formatfilter',(e) =>{
           
  return String(e).replace(/\B(?=(\d{3})+(?!\d))/g, ',');
     
})





